<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>荣誉详情 - {{ honor.title }}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body { background: #f6fbff; font-family: 'Segoe UI', Arial, sans-serif; color: #222; margin:0; }
        .container {
            max-width: 98vw;
            width: 520px;
            margin: 48px auto;
            background: #fff;
            border-radius: 14px;
            box-shadow: 0 4px 24px rgba(25,118,210,0.10);
            padding: 36px 32px 28px 32px;
        }
        h2 { color: #1976d2; font-size: 26px; margin-bottom: 18px; text-align: center; }
        .meta { color: #888; font-size: 15px; margin-bottom: 18px; text-align: center; }
        .detail-table { width: 100%; font-size: 16px; color: #333; margin-bottom: 18px; }
        .detail-table td { padding: 8px 6px; }
        .detail-table .label { color: #1976d2; font-weight: bold; width: 90px; }
        .desc { font-size: 15px; color: #444; background: #f6fbff; border-radius: 8px; padding: 12px; margin-bottom: 18px; }
        .cert-img {
            width: 100%;
            max-width: 480px;
            height: auto;
            max-height: 60vh;
            object-fit: contain;
            border-radius: 8px;
            display: block;
            margin: 0 auto 12px auto;
            box-shadow: 0 2px 8px rgba(25,118,210,0.07);
        }
        .back-btn { background: #1976d2; color: #fff; border: none; border-radius: 8px; padding: 10px 28px; font-size: 16px; cursor: pointer; display: block; margin: 0 auto; transition: background 0.2s; }
        .back-btn:hover { background: #1256a6; }
    </style>
</head>
<body>
    <div class="container">
        <h2>{{ honor.title }}</h2>
        <div class="meta">{{ honor.honor_type }} | {{ honor.date }} | {{ honor.student_name }}</div>
        <table class="detail-table">
            <tr><td class="label">荣誉类型</td><td>{{ honor.honor_type }}</td></tr>
            <tr><td class="label">获奖级别</td><td>{{ honor.rank }}</td></tr>
            <tr><td class="label">获奖等级</td><td>{{ honor.level }}</td></tr>
            <tr><td class="label">颁发机构</td><td>{{ honor.organization }}</td></tr>
            <tr><td class="label">颁发日期</td><td>{{ honor.date }}</td></tr>
        </table>
        <div class="desc">{{ honor.description or '无描述' }}</div>
        {% if is_img and honor.certificate_url %}
            <img src="{{ honor.certificate_url }}" class="cert-img" alt="证书图片">
            <a href="{{ honor.certificate_url }}" download style="display:block;margin-top:10px;color:#1976d2;text-decoration:underline;font-size:16px;">下载证明材料</a>
        {% elif honor.certificate_url %}
            <img src="/static/imges/honor.jpg" class="cert-img" alt="证书图片">
            <div style="text-align:center;color:#888;font-size:14px;">非图片类型证明材料</div>
            <a href="{{ honor.certificate_url }}" download style="display:block;margin-top:10px;color:#1976d2;text-decoration:underline;font-size:16px;">下载证明材料</a>
        {% else %}
            <img src="/static/imges/honor.jpg" class="cert-img" alt="证书图片">
            <div style="text-align:center;color:#888;font-size:14px;">无证明材料</div>
        {% endif %}
        <button class="back-btn" onclick="window.history.back()">返回</button>
    </div>
</body>
</html> 